//
//  TaoCanAnLiTableViewCell.m
//  Wedding fantastic
//
//  Created by ZLM on 15/7/2.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "TaoCanAnLiTableViewCell.h"

@implementation TaoCanAnLiTableViewCell
-(void)dealloc{
    [_imageV release];
    [_titleLabel release];
    [_nameLabel release];
    [_shouCanLabel release];
    [_myButton release];
    [super dealloc];
    
}
//重写init方法
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createViews];
    }
    return self;
}
//创建子视图
-(void)createViews{
    self.layer.borderWidth = 0;
    self.imageV = [[UIImageView alloc]initWithFrame:CGRectMake(10, 10, 355*kWidth/375, 180*kHeight/667)];
    //隐藏边框：
    self.imageV.layer.masksToBounds = YES;
    //边角：
//    self.imageV.layer.cornerRadius = 20;
    
    [self.contentView addSubview:self.imageV];
    
    self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(10*kWidth/375, self.imageV.frame.origin.y+self.imageV.frame.size.height, 200*kWidth/375, 30*kHeight/667)];
    self.titleLabel.textColor = [UIColor brownColor];
    self.titleLabel.font = [UIFont fontWithName:@"Arial-BoldItalicMT" size:15];
    
//   标题标签
    self.titleLabel.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.titleLabel];
    [self.titleLabel release];
    self.nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(10*kWidth/375,self.titleLabel.frame.origin.y+self.titleLabel.frame.size.height+2*kWidth/375, 200*kWidth/375, 28*kHeight/667)];
    self.nameLabel.textColor = [UIColor redColor];
//    名称标签
    self.nameLabel.textColor = [UIColor grayColor];
    self.nameLabel.font = [UIFont fontWithName:@"Arial-BoldItalicMT" size:12];
    self.nameLabel.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.nameLabel];
    [self.nameLabel release];
////    收藏标签
//    self.shouCanLabel = [[UILabel alloc]init];
//    self.shouCanLabel.backgroundColor = [UIColor whiteColor];
//    self.shouCanLabel.text = @"收藏";
//    self.shouCanLabel.textColor = [UIColor redColor];
//    self.shouCanLabel.frame = CGRectMake(kWidth-80, self.nameLabel.frame.origin.y-10, 80, 20);
//    [self.contentView addSubview:self.shouCanLabel];
    
    [self.imageV release];    
    self.backgroundColor = [UIColor whiteColor];
 
    
//    self.myButton = [UIButton buttonWithType:UIButtonTypeCustom];
//    self.myButton.frame = CGRectMake(kWidth - 80, self.nameLabel.frame.origin.y-10-20, 40, 30);
//    self.myButton.backgroundColor = [UIColor yellowColor];
//    
//    [self.contentView addSubview:self.myButton];

}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
